#include "odbc/details/diagnostic_record.hpp"
#include <boost/test/auto_unit_test.hpp>

namespace
{

using namespace odbc::details;

BOOST_AUTO_TEST_CASE( test_initialization)
{
	const std::string sql_state( "H0001");
	const std::string odbc_error_message( "My odbc error message");
	int native_error_code( -100);
	diagnostic_record rec( sql_state, native_error_code, odbc_error_message);
	BOOST_CHECK_EQUAL( sql_state, rec.sql_state());
	BOOST_CHECK_EQUAL( native_error_code, rec.native_error());
	BOOST_CHECK_EQUAL( odbc_error_message, rec.error_message());
}

}
